package com.jzo2o.customer.controller.worker;


import com.jzo2o.customer.model.domain.WorkerCertification;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/worker")
@RequiredArgsConstructor
public class CertificationController {

    private final IWorkerCertificationService workerCertificationService;

    //提交认证申请
    @PostMapping("/worker-certification-audit")
    public WorkerCertification apply(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        return workerCertificationService.certification(workerCertificationAuditAddReqDTO);
    }

    //查询最新的驳回原因

    @GetMapping("/worker-certification-audit/rejectReason")
    public String rejectReason() {
        return workerCertificationService.rejectReason();
    }


}
